package PPJ;

import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class regex {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		String regex= "([0-9]+)\\s+(.+)\\s+([1-9][0-9]*)";
		
		Pattern pattern = Pattern.compile(regex);
		
		String tekst = "1274 a67d 1";
		
		Matcher matcher = pattern.matcher(tekst);
		
		if(matcher.matches()== true)
		{
			System.out.println("Tekst PASUJE");
		}
		else
			System.out.println("Text NIE PASUJE");

	}

}
